/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package myjobs;

import ircbot.Bot;
import ircbot.Job;
import ircbot.JobInitializer;
import java.util.HashMap;
import java.util.Iterator;

/**
 *
 * @author andreas
 */
public class GreeterJobIniter implements JobInitializer {
    String command = "greeter";
    HashMap<String, Job> jobs = new HashMap<String, Job>();

    public String getCmd() {
        return command;
    }

    public Iterator<Job> iterator() {
        return jobs.values().iterator();
    }

    public void newJob(String name, Bot bot, String channel) {
        jobs.put(name, new GreeterJob(bot, channel));
    }

    public void removeJob(String name) {
        jobs.remove(name);
    }

}
